﻿using System;
using System.Collections.Generic;
using System.Text;
using Sio.Mdm.Types;
using System.Reflection;

namespace Sio.Mdm.Server
{
    public interface ISecurityHandler
    {
        /// <summary>
        /// When implemented should return true if <paramref name="targetMethod"/>
        /// should be called or false othervise.
        /// </summary>
        /// <param name="session"><see cref="Session"/> instance calling method</param>
        /// <param name="targetMethod">Target method being called</param>
        /// <param name="args">Arguments passed to <paramref name="targetMethod"/></param>
        /// <returns>True if call is allowed; false othervise</returns>
        bool CheckSecurity(Session session, MethodInfo targetMethod, params object[] args);
    }
}
